import java.util.Scanner;

public class Mian2 {
    //条件运算符 a > b ? a : b
    public static void main1(String[] args) {
        //求两个数的最大数
        int a = 10;
        int b = 20;
        int c = a > b ? a : b;
        System.out.println(c);
    }
    //判断是否是闰年
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int year = scanner.nextInt();

        if(year % 100 == 0) {
            if(year % 400 == 0) {
                System.out.println(year + "是闰年");
            }else {
                System.out.println(year + "不是闰年");
            }
        }else {
            if(year % 4 == 0){
                System.out.println(year + "是闰年");
            }else {
                System.out.println(year + "不是闰年");
            }
        }
    }

    //计算1! + 2! + 3! + 4! + 5!
    public static void main3(String[] args) {
        int i;
        int sum;
        int n = 1;
        int all = 0;
        while (n <= 5) {
            i = 1;
            sum = 1;
            while(i <= n) {
                sum *= i;
                i++;
            }
            all += sum;
            n++;
        }
        System.out.println(all);
    }

    //求斐波那契数列的第 N 项
    public static int fib(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        return fib(n - 1) + fib(n - 2);
    }

    public static void main4(String[] args) {
        int n = 3;
        System.out.println(fib(n));
    }
}
